<%--
  Created by IntelliJ IDEA.
  User: 郑自航
  Date: 2018/7/4
  Time: 11:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri= "http://java.sun.com/jsp/jstl/core" prefix= "c" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<c:set var="basePath" value="${pageContext.request.contextPath}"></c:set>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>layout 后台大布局 - Layui</title>
    <link rel="stylesheet" href="${basePath}/layui/css/layui.css">
    <link rel="stylesheet" href="${basePath}/css/main.css">
    <script type="text/javascript" src="${basePath}/js/plugin/jquery-2.1.0.min.js"></script>
    <script type="text/javascript" src="${basePath}/js/plugin/jquery.i18n.properties.min.js"></script>
    <script src="${basePath}/layer/layer.js"></script>
    <script src="${basePath}/layui/layui.js"></script>
</head>

<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">
            <span class="l-lab-text">layui 后台布局</span>
        </div>
        <!-- 头部区域（可配合layui已有的水平导航） -->
        <!--<ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item">
                <a href="">控制台</a>
            </li>
            <li class="layui-nav-item">
                <a href="">商品管理</a>
            </li>
            <li class="layui-nav-item">
                <a href="">用户</a>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:;">其它系统</a>
                <dl class="layui-nav-child">
                    <dd>
                        <a href="">邮件管理</a>
                    </dd>
                    <dd>
                        <a href="">消息管理</a>
                    </dd>
                    <dd>
                        <a href="">授权管理</a>
                    </dd>
                </dl>
            </li>
        </ul>-->
        <ul class="layui-nav layui-layout-right">
        <shiro:user>
            <li class="layui-nav-item welcom-user">
                欢迎[ <shiro:principal/> ]登录
            </li>
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <!--<img src="http://t.cn/RCzsdCq" class="layui-nav-img">-->
                    <span class="l-lab-text">切换语言</span>
                </a>
                <dl class="layui-nav-child lang-switch">
                    <dd>
                        <a href="javascript:;" onclick="changeLang('zh')">简体中文</a>
                    </dd>
                    <%--<dd>--%>
                        <%--<a href="javascript:;" onclick="changeLang('en')">English</a>--%>
                    <%--</dd>--%>
                </dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:;" onclick="loginOut()" class="l-lab-text">LoginOut</a>
            </li>
        </shiro:user>
        </ul>
    </div>

    <div class="layui-side layui-bg-black menu-show">

        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" id="menu-nav" lay-filter="test">
                <li class="layui-nav-item layui-nav-itemed">
                </li>
            </ul>
        </div>
    </div>
    <div class="layui-body body-show">
        <div class="nav-btn-toggle">
            <div>
                <b class="layui-icon layui-icon-shrink-right" id="menu_toggle" style="font-size: 20px; color: #DBDBDB;margin-top: 5px;"></b>
            </div>
        </div>
        <!-- 内容主体区域 -->
        <div style="padding-left: 30px;">
            <div class="layui-tab" lay-filter="content" lay-allowClose="true">
                <ul class="layui-tab-title">
                    <%--<li class="layui-this">总概</li>--%>
                </ul>
                <div class="layui-tab-content">
                    <%--<div class="layui-tab-item layui-show">--%>
                        <%--<iframe src="sys_index.page" id="iframe_sys_index" class="mainiframe" width="100%" height="100%" frameborder="0" scrolling="auto"></iframe>--%>
                    <%--</div>--%>
                </div>
            </div>
        </div>
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        © layui.com - 底部固定区域
    </div>
</div>
<script src="${basePath}/js/menu_nav.js"></script>
<script src="${basePath}/js/i18n.js"></script>
<script type="text/javascript">
    $(function(){
        //获取LOGO,字典类型:layer_logo
        doGetLogo();
        //初始化菜单导航栏
        doGetUserMenus();
        $("#menu_toggle").on('click',function () {

            $(".layui-bg-black").toggleClass('menu-hiden').toggleClass('menu-show');
            $(".layui-body").toggleClass('body-hiden').toggleClass('body-show');

        });

        // changeFrameHeight();
    });
    function loginOut() {
        //询问框
        myLayer.confirm("Are you sure to quit?",function () {
            window.location.href='${basePath}/logout.do';
        })
    }
</script>
</body>

</html>